<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<script src="./MyPromise.js"></script>
</head>
<body>
	<script>
		function handlePromise () {
			return new MyPromise((resolve, reject) => {
				setTimeout(() => {
					resolve('成功')
				}, 2000)
			})
		}
		handlePromise().then((value) => {
			console.log(value)
		},(error) => {
			console.log(value)
		})
	</script>
</body>
</html>